package frame.options.simulation.create.embedding;

import java.awt.Component;

import javax.swing.DefaultListCellRenderer;
import javax.swing.JList;

import model.algorithms.embedding.EmbeddingAlgorithm;

@SuppressWarnings("serial")
public class EmbeddingListCellRenderer extends DefaultListCellRenderer
{
	@Override
	public Component getListCellRendererComponent( JList< ? > list, Object value, int index, boolean isSelected, boolean cellHasFocus )
	{
		super.getListCellRendererComponent( list, value, index, isSelected, cellHasFocus );
		
		this.setText( ( (EmbeddingAlgorithm) value ).getName() );
		
		return this;
	}

}
